/*
 * Cube.h
 *
 *  Created on: 28/03/2013
 *      Author: gonzalo
 */

#ifndef CUBE_H_
#define CUBE_H_

#include "Figure.h"

class Cube: public Figure {
private:

	static GLfloat * static_vertex_buffer;
	static GLuint * static_index_buffer;
	static GLfloat * static_normal_buffer;
	static GLfloat * static_texture_buffer;
	static GLfloat * static_tangent_buffer;

	static GLuint static_vertex_buffer_size;
	static GLuint static_index_buffer_size;
	static GLuint static_normal_buffer_size;

	static void instantiate_buffer();
	static void create_vertex_buffer();
	static void create_index_buffer();
	static void create_normal_buffer();
	static void create_texture_buffer();

	static DatosVertice * static_vertices;
	static unsigned int * static_indices;
	static GLuint static_vertex_buffer_object;
	static GLuint static_index_buffer_object;

	void create_mesh_cube();

public:
	Cube(GLuint program);
	virtual ~Cube();

	virtual void draw(GLuint program, glm::mat4 & world_matrix);

	void set_color(const glm::vec3 & color);

	virtual void change_texture_data(const std::vector<DatosVertice> & texturas);
};

#endif /* CUBE_H_ */
